<?php
    require('plugin.php');

    if (isset($_GET['keyword'])){
        $keyword=$_GET['keyword'];
    }
    else
    {
        header("HTTP/1.1 404 Not Found");
        exit('invalid parameter:keyword');
    }

    
    $mserver=new mserver();
    if ($keyword==null)
    {
        echo json_encode([]);
    }
    else
    {
        echo json_encode($mserver->search($keyword));
    }
    
?>